1. Field of the Invention
The present invention relates to a method and apparatus for generating harmonics using non-linear functions.
2. Description of the Related Art
In general, in the descriptions that follow, I will italicize the first occurrence of each special term of art that should be familiar to those skilled in the art of integrated circuits (“ICs”) and systems. In addition, when I first introduce a term that I believe to be new or that I will use in a context that I believe to be new, I will bold the term and provide the definition that I intend to apply to that term. In addition, throughout this description, I will sometimes use the terms assert and negate when referring to the rendering of a signal, signal flag, status bit, or similar apparatus into its logically true or logically false state, respectively, and the term toggle to indicate the logical inversion of a signal from one logical state to the other. Alternatively, I may refer to the mutually exclusive boolean states as logic_0 and logic_1. Of course, as is well known, consistent system operation can be obtained by reversing the logic sense of all such signals, such that signals described herein as logically true become logically false and vice versa. Furthermore, it is of no relevance in such systems which specific voltage levels are selected to represent each of the logic states.
Hereinafter, when I refer to a facility I mean a circuit or an associated set of circuits adapted to perform a particular function regardless of the physical layout of an embodiment thereof. Thus, the electronic elements comprising a given facility may be instantiated in the form of a hard macro adapted to be placed as a physically contiguous module, or in the form of a soft macro the elements of which may be distributed in any appropriate way that meets speed path requirements. In general, electronic systems comprise many different types of facilities, each adapted to perform specific functions in accordance with the intended capabilities of each system. Depending on the intended system application, the several facilities comprising the hardware platform may be integrated onto a single IC, or distributed across multiple ICs. Depending on cost and other known considerations, the electronic components, including the facility-instantiating IC(s), may be embodied in one or more single- or multi-chip packages. However, unless I expressly state to the contrary, I consider the form of instantiation of any facility that practices my invention as being purely a matter of design choice.
Shown in FIG. 1 is a typical general purpose computer system 10. In particular, in recently-developed battery-powered mobile systems, such as smart-phones and the like, many of the discrete components typical of desktop or laptop devices illustrated in FIG. 1 are integrated into a single integrated circuit chip.
Shown by way of example in FIG. 2 is one embodiment of a single-chip audio coder/decoder (“CODEC”) 12 comprising: a plurality of digital modules; and a plurality of analog modules. In this embodiment, CODEC 12 includes a Serial Data Interface facility adapted to send data to, and receive digital data from, the system 10; a Digital Phase-Locked Loop (“DPLL”) facility adapted to determine the timing and rate relationship between two asynchronous data streams; a Configuration Memory and Control facility adapted to control which facilities are used and how, in accordance with configuration and control information received from the system 10; a Digital Signal Processor (“DSP”) facility adapted to perform various data processing activities in accordance with a stored computer program; and a Data Memory facility adapted to store, as required, audio data flowing from the system 10 to the audio output devices. I may expand on the functionality of certain of these facilities as I now explain the method of operation of my invention and embodiments thereof.
Non-linear functions are often used in audio bass enhancement algorithms, to produce harmonics of tones that are too low to be reproduced in a particular speaker system. Some nonlinear functions that have been used in prior art include clipping, absolute value, and trigonometric functions, such as sine. Symmetrical clipping and absolute value functions produce high order harmonics at relatively high volume levels, requiring the higher order harmonics to be filtered out, to avoid unwanted artifacts such as mid-range buzzing. Furthermore, in digital systems, higher order harmonics can be aliased to lower frequencies, which may be at audible levels in the audio band needed for the bass enhancement algorithm to work. Thus, it may not be feasible to remove these aliased higher order harmonics without causing undesirable noise.
Using a sine non-linear function can produce odd harmonics without the un-wanted higher order harmonics, but trigonometric functions require much more computational hardware or software. A large look-up table (“LUT”) of pre-calculated sine values can be used instead of calculating each time a sample is needed, but this also requires hardware, either in logic, RAM, or ROM. If a smaller LUT is used, un-wanted noise can be introduced from the quantization effects, both in the limited LUT index width, and the limited width of each table entry. Un-wanted higher order harmonics may also be generated by clipping. I submit that a method is needed to produce even and odd harmonics without these un-wanted side effects.